package poker

type Poker struct {
	Value int
	Suit  int
	Order int
}

const (
	Black = iota + 1 //黑
	Red              //红
	Plum             //梅花
	Block            //方块
	King
)

func (p *Poker) GetValue() int {
	return p.Value
}

func (p *Poker) GetSuit() int {
	return p.Suit
}

func (p *Poker) GetOrder() int {
	return p.Order
}
func (p *Poker) GetCards() (list []Poker) {
	list = make([]Poker, 0)
	colors := []int{Black, Red, Plum, Block}
	for _, v := range colors {
		for j := 2; j < 15; j++ {
			order := j
			if j == 2 {
				order = 15
			}
			poker := Poker{j, v, order}
			list = append(list, poker)
		}
	}
	list = append(list, []Poker{Poker{1, King, 1}, {2, King, 2}}...)
	return list
}
